commonModule.directive('waterfall', function() {
    return {
        restrict: 'A',
        replace: true,
        link: function(scope, elem, attrs) {
            elem.imagesLoaded(function() {
                scope.test = elem.masonry({
                    itemSelector: '.grid-item',
                    isAnimatedBooleanfalse: true,
                    isFitWidthBooleanfalse: true,
                    isResizableBooleantrue: true
                });
            });

        }

    };
});
